package com.kc.business.domain;

import lombok.Data;
import org.springframework.data.annotation.Transient;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 红包domain
 */
@Data
@Table(name = "kc_goods_coupon")
public class BizGoodsCoupon {
    @Id
    /*主键id*/
    private Integer id;
    /*红包名称*/
    @NotBlank(message = "名称不能为空")
    private String name;
    /*类别:1固定金额，2比例*/
    @NotNull(message = "类别不能为空")
    private Integer type;
    /*金额*/
    @NotNull(message = "金额不能为空")
    private Double money;
    /*开始时间*/
    private String startDate;
    /*结束时间*/
    private String endDate;
    /*时间范围*/
    @Transient
    private String[] dateArr;
    /*删除标记:1已删除，0未删除*/
    private Integer isDeleted = 0;
    /*状态:1上架，0下架*/
    @NotNull(message = "状态不能为空")
    private Integer status;
}
